// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 创建评论 POST /api/comments/add */
export async function addCommentsUsingPost(
  body: API.CommentsAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/comments/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 删除评论 POST /api/comments/delete */
export async function deleteCommentsUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/comments/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据 id 获取评论 GET /api/comments/get/vo */
export async function getCommentsVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getCommentsVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseCommentsVO_>('/api/comments/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 管理端-分页获取评论列表 POST /api/comments/list/page */
export async function listCommentsByPageUsingPost(
  body: API.CommentsQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageComments_>('/api/comments/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 分页获取评论列表（封装类） POST /api/comments/list/page/vo */
export async function listCommentsVoByPageUsingPost(
  body: API.CommentsQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCommentsVO_>('/api/comments/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 分页获取当前登录用户创建的评论列表 POST /api/comments/my/list/page/vo */
export async function listMyCommentsVoByPageUsingPost(
  body: API.CommentsQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCommentsVO_>('/api/comments/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
